package com.xiaoxi.logaspectcommon.common.constant;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author xiaoxi
 * @ProjectName bms
 * @PackageName com.xiaoxi.bms.service.common.aspect.operation
 * @ClassName OperationCons
 * @Description 操作静态类 ----------------- 说明：
 *      1. 无返回值类型不可使用
 *      2. 日志微服务涉及到写操作不可使用。（边读边写，就会产生死锁）
 *      3. 接入该静态包：
 *          3.1 导入该包
 *          3.2 配置文件编写：是否记录登录日志、操作日志
 * @Date 2022/10/31 9:47
 * @Version 1.0
 */
public class OperationConstants {

    public static final String CODE = "CODE_";          // 用于操作日志快速识别字典
    public static final String LABEL = "LABEL_";        // 用于操作日志快速识别字典对应解释

    public static final String CODE_CREATE = "CREATE";
    public static final String LABEL_CREATE = "新增";

    public static final String CODE_DELETE = "DELETE";
    public static final String LABEL_DELETE = "删除";

    public static final String CODE_MODIFY = "MODIFY";
    public static final String LABEL_MODIFY = "修改";

    public static final String CODE_QUERY_PAGE = "QUERY_PAGE";
    public static final String LABEL_QUERY_PAGE = "分页查询";

    public static final String CODE_QUERY_ONE = "QUERY_ONE";
    public static final String LABEL_QUERY_ONE = "精准查询";

    public static final String CODE_QUERY_TREE = "QUERY_TREE";
    public static final String LABEL_QUERY_TREE = "树形查询";

    public static final String CODE_ENABLE = "ENABLE";
    public static final String LABEL_ENABLE = "启用";

    public static final String CODE_CHECK = "CHECK";
    public static final String LABEL_CHECK = "校验";

    public static final String CODE_ACCOUNT = "ACCOUNT";
    public static final String LABEL_ACCOUNT = "锁定";

    public static final String CODE_MOVE = "MOVE";
    public static final String LABEL_MOVE = "移动顺序";

    public static final String CODE_CHANGE_PASSWORD = "CHANGE_PASSWORD";
    public static final String LABEL_CHANGE_PASSWORD = "修改密码";


    public static final Map<String, String> DICT_MAP = new HashMap<>();

    static {
        DICT_MAP.put("LABEL_CREATE", LABEL_CREATE);
        DICT_MAP.put("LABEL_DELETE", LABEL_DELETE);
        DICT_MAP.put("LABEL_MODIFY", LABEL_MODIFY);
        DICT_MAP.put("LABEL_QUERY_PAGE", LABEL_QUERY_PAGE);
        DICT_MAP.put("LABEL_QUERY_ONE", LABEL_QUERY_ONE);
        DICT_MAP.put("LABEL_ENABLE", LABEL_ENABLE);
        DICT_MAP.put("LABEL_CHECK", LABEL_CHECK);
        DICT_MAP.put("LABEL_ACCOUNT", LABEL_ACCOUNT);
        DICT_MAP.put("LABEL_QUERY_TREE", LABEL_QUERY_TREE);
        DICT_MAP.put("LABEL_MOVE", LABEL_MOVE);
        DICT_MAP.put("LABEL_CHANGE_PASSWORD", LABEL_CHANGE_PASSWORD);
    }



}
